#pragma once
#define _WINSOCKAPI_
#include <Windows.h>
#include "non_copy_able.h"
#include "el_export.h"

namespace el
{
	class COMM_SERVER_EXPORT WinEventLock :noncopyable
	{
	public:
		WinEventLock(bool manual_reset = false, bool init_status = false);
		~WinEventLock();

		unsigned long wait(unsigned long timeout = INFINITE);
		bool setEvent();
		bool pulseEvent();
		bool resetEvent();

	private:
		HANDLE event_lock_;
	};


}

